package com.classnet.mail;

import com.classnet.util.CnetResult;

/**
 *
 * @author karltinawi
 * @version 1.0
 */
public class PostManResult extends CnetResult {
    
    public static final int POST_SENT = 0;
    public static final int POST_FAIL = 1;
    
    private MailMessage mailMessage;
    
    public PostManResult(int result, String description, MailMessage mailMessage) {
        super(result, description);
        this.mailMessage = mailMessage;
    }
    
    public MailMessage getMailMessage() {
        return mailMessage;
    }
    
    @Override
    public String getResultValue() {
        switch (getResult()) {
            case POST_SENT: return "SENT";
            case POST_FAIL: return "FAIL";
            default:        return "UNKNOWN";
        }
    }
}